#!/usr/bin/env python
import os, sys

if len(sys.argv) != 2:
    print 'Usage: %s <max tip number>' % sys.argv[0]
    sys.exit()

latest_tip_number = int(sys.argv[1])

for tip_number in range(1, latest_tip_number+1):
    print 'python scrape_tip.py %(tip_number)d > %(tip_number)d.txt' % locals()
    if os.system('python scrape_tip.py %(tip_number)d > %(tip_number)d.txt' % locals()) != 0:
        print >> sys.stderr, 'Error in processing tip %d' % tip_number


# vim: tabstop=4 shiftwidth=4 expandtab backspace=indent autoindent smartindent
# The End
